package com.aipolice.pojo;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Objects;

@Entity
@Table(name = "report_", schema = "aipolice", catalog = "")
public class Report {
    private int id;
    private Integer uid;
    private String uname;
    private Timestamp date;
    private String tel;
    private String adress;
    private String describe;
    private Integer state;
    private String level;
    private Integer del;
    private Integer conid;

    @Override
    public String toString() {
        return "Report{" +
                "id=" + id +
                ", uid=" + uid +
                ", uname='" + uname + '\'' +
                ", date=" + date +
                ", tel='" + tel + '\'' +
                ", adress='" + adress + '\'' +
                ", describe='" + describe + '\'' +
                ", state=" + state +
                ", level='" + level + '\'' +
                ", del=" + del +
                ", conid=" + conid +
                '}';
    }

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "uid")
    public Integer getUid() {
        return uid;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    @Basic
    @Column(name = "uname")
    public String getUname() {
        return uname;
    }

    public void setUname(String uname) {
        this.uname = uname;
    }

    @Basic
    @Column(name = "date")
    public Timestamp getDate() {
        return date;
    }

    public void setDate(Timestamp date) {
        this.date = date;
    }

    @Basic
    @Column(name = "tel")
    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }

    @Basic
    @Column(name = "adress")
    public String getAdress() {
        return adress;
    }

    public void setAdress(String adress) {
        this.adress = adress;
    }

    @Basic
    @Column(name = "describe_")
    public String getDescribe() {
        return describe;
    }

    public void setDescribe(String describe) {
        this.describe = describe;
    }

    @Basic
    @Column(name = "state")
    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    @Basic
    @Column(name = "level_")
    public String getLevel() {
        return level;
    }

    public void setLevel(String level) {
        this.level = level;
    }

    @Basic
    @Column(name = "del")
    public Integer getDel() {
        return del;
    }

    public void setDel(Integer del) {
        this.del = del;
    }

    @Basic
    @Column(name = "conid")
    public Integer getConid() {
        return conid;
    }

    public void setConid(Integer conid) {
        this.conid = conid;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Report report = (Report) o;
        return id == report.id &&
                Objects.equals(uid, report.uid) &&
                Objects.equals(uname, report.uname) &&
                Objects.equals(date, report.date) &&
                Objects.equals(tel, report.tel) &&
                Objects.equals(adress, report.adress) &&
                Objects.equals(describe, report.describe) &&
                Objects.equals(state, report.state) &&
                Objects.equals(level, report.level) &&
                Objects.equals(del, report.del) &&
                Objects.equals(conid, report.conid);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, uid, uname, date, tel, adress, describe, state, level, del, conid);
    }
}
